Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1828 - Remove code due to hard fork - Dec 2024 #1930

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Cmdv
Copy link
Contributor

@Cmdv Cmdv commented Jan 9, 2025

Description

This fixes #1828

Checklist

  • Commit sequence broadly makes sense
  • Commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the changelog
  • Code is formatted with fourmolu on version 0.10.1.0 (which can be run with scripts/fourmolize.sh)
  • Self-reviewed the diff

Migrations

  • The pr causes a breaking change of type a,b or c
  • If there is a breaking change, the pr includes a database migration and/or a fix process for old values, so that upgrade is possible
  • Resyncing and running the migrations provided will result in the same database semantically

If there is a breaking change, especially a big one, please add a justification here. Please elaborate
more what the migration achieves, what it cannot achieve or why a migration is not possible.

@Cmdv Cmdv requested a review from a team as a code owner January 9, 2025 13:26
@sgillespie
Copy link
Contributor

I'm sure you already know this, but CI is now failing with:


src/Cardano/DbSync/Sync.hs:203:9: error:
    • Couldn't match type ‘((), Maybe BSL.ByteString)’ with ‘()’
      Expected type: IO () -> IO ((), Maybe BSL.ByteString)
        Actual type: IO ((), Maybe BSL.ByteString)
                     -> IO ((), Maybe BSL.ByteString)
    • The first argument of ($) takes one argument,
      its type is ‘cat0 a0 c0’,
      it is specialized to ‘IO ((), Maybe BSL.ByteString)
                            -> IO ((), Maybe BSL.ByteString)’
      In the expression:
        liftIO . logException tracer "ChainSyncWithBlocksPtcl: "
          $ do logInfo tracer "Starting ChainSync client"
               setConsistentLevel syncEnv Unchecked
               (latestPoints, currentTip) <- waitRestartState tc
               let (inMemory, onDisk) = List.span snd latestPoints
               ....
      In the second argument of ‘($)’, namely
        ‘\ _ctx channel
           -> liftIO . logException tracer "ChainSyncWithBlocksPtcl: "
                $ do logInfo tracer "Starting ChainSync client"
                     setConsistentLevel syncEnv Unchecked
                     ....’
    |
203 |         liftIO . logException tracer "ChainSyncWithBlocksPtcl: " $ do
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Test.Cardano.Db.Mock.Unit.Babbage.Rollback
Test.Cardano.Db.Mock.Unit.Babbage.Simple
Test.Cardano.Db.Mock.Unit.Babbage.Stake
Test.Cardano.Db.Mock.Unit.Babbage.Tx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we want to remove ALL past era tests?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could keep some tests as a reference and some that showcase differences in the behaviour between eras. We could filter them together in a meeting.

Copy link
Contributor

@kderme kderme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the issues that Sean raised, this looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean code after HF
3 participants